turing machine logic instead of something
You could write $\neq 2 \to x,R$, but you might have to explain somewhere that by that you mean that the transition is taken as long as the symbol read is not $2$.

More generally, you can use whatever notation you want as long as you explain it and it's unambiguous.

This is the answer of a practical mathematician. Your professor could have different ideas.