mysql case when then else end 用法

select case when 判断条件 then 输出结果  else 输出结果 end from table

原文地址:https://www.cnblogs.com/daviddong/p/5943297.html