可以使用case when then组合。
例子1:
select
item_a,
case
when condition1 then 'tag1'
when condition2 then 'tag2'
end as tag
from sealgo.deepfm_sample_field
最后出来的效果是,两列,一列item_a,一列tag
除了这样用,这里还给了其他用法:https://www.navicat.com.cn/company/aboutus/blog/341-sql-case
但是大部分都是case when这种组合。



