使用case when代替if
SELECT CASE WHEN 1 > 2 then 1 else 4 end;