select case when string="1" then "返回的数据1" when string="2" then "返回的数据2" else "返回的其他数据" end as 新的列名 from table where ....
select case when string="1" then "返回的数据1" when string="2" then "返回的数据2" else "返回的其他数据" end as 新的列名 from table where ....
转载于:https://www.cnblogs.com/mingforyou/p/3398303.html