稍显复杂sql语句的用法

select case order_state when ‘0’ then ‘已取消’ when ‘10’ then ‘已下单’ when ‘20’ then if(payment_code = ‘offline’,’货到付款’,’已付款’) when ‘30’ then ‘已发货’ when ‘40’ then ‘已完成’ end from shopnc_order;