Next time resolve the conditionals:
($a == "1") || ($a == "2")
= (1 == 1) || (1 == 2)
= 1 || 0
= 1
($a != "1") || ($a != "2")
= (1 != 1) || (1 != 2)
= 0 || 1
= 1
So both expressions resolve to 1, a true value.
Using an else statement is the way to go, as you have discovered.