If the problem is truly as simple as stated, then use "case":
set col = case col
when 1 then 2
else 1 end
That also takes care of the where clause.
I double you problem is quite that simple so make sure that you check the query for yourself.