MySQL case when 用法
eg:
SELECT type, CASE WHEN `type` = 1 THEN ‘熱門優惠‘ WHEN `type` = 2 THEN ‘新優惠‘ WHEN `type` = 3 THEN ‘現金券‘ WHEN `type` = 4 THEN ‘1蚊福利‘ WHEN `type` = 5 THEN ‘積分換領‘ WHEN `type` = 6 THEN ‘mCoin現金券‘ ELSE ‘mCoin現金券‘ END as type FROM fook_business_product