You can represent the 3 postions using binary with 1 variable.
Like with a 8 bit number the least significant bit is 1 and the next is 2 and the next is 4.
variable == 4 the result is oox
variable == 2 the result is oxo
variable == 1 the result is xoo
So the variable can be anything between 0-7 which represents a condition you can act on.