mysql multiple case statements code example
Example: mysql case when multiple conditions
select (
case when (value1 = 1) then (value2)
when (value2 = 1) then (value1) end) as newColumnname
from tablename where value1 = 1 or value2 = 1
select (
case when (value1 = 1) then (value2)
when (value2 = 1) then (value1) end) as newColumnname
from tablename where value1 = 1 or value2 = 1