You can't set a variable to multiple values in any ordinary programming language that I know of, but you may most certainly loop over a set of values with a variable.
Construct a shell loop around the awk code that runs for each value of x:
for x in 0 1; do
printf 'Running with x=%d\n' "$x"
awk -v x="$x" \
'$1 == "x" { $1 = x }
$2 == "x" { $2 = x }
$1 == $2 { printf("match on line %d: %d == %d\n", NR, $1, $2) }' file.in
done
The awk code tests the two columns for the character x and (if true) sets it to the current value of the awk variable x (which is set on the command line).
If the columns later are the same, some output is produced.
With the given data, this produces the output
Running with x=0
match on line 1: 0 == 0
match on line 3: 1 == 1
Running with x=1
match on line 2: 1 == 1
match on line 3: 1 == 1
Alternatively, move the loop into awk (which which is much more efficient as the shell does not need to start awk more than once):
awk -v x="$x" \
'{ for (x=0; x<=1; ++x) {
printf("x is %d\n", x);
if ($1 == "x") { a = x } else { a = $1 }
if ($2 == "x") { b = x } else { b = $2 }
if (a == b) { printf("match on line %d: %d == %d\n", NR, a, b) }
}
}' file.in
Output:
x is 0
match on line 1: 0 == 0
x is 1
x is 0
x is 1
match on line 2: 1 == 1
x is 0
match on line 3: 1 == 1
x is 1
match on line 3: 1 == 1