根据查询字段值,直接查询出想要的结果:
SELECT t.*,
CASE
WHEN t.IIS_END_FLAG = 0 THEN '优'
WHEN t.IIS_END_FLAG = 1 THEN '良'
ELSE '差'
END IS_END_FLAG_label,
CASE
WHEN t.IIS_REPLY_FLAG = 0 THEN '未批复'
ELSE '已批复'
END IS_REPLY_FLAG_label
FROM VSM_REPORT_MANAGE t