sql 如下
select
(case when t.C810000005 when '查询' then t.C800010007 when '专题' then t.C800010009 when '资源' then t.C800010016 else 0 end) as 反馈次数 from aaa
select
(case when t.C810000005 when '查询' then t.C800010007 when '专题' then t.C800010009 when '资源' then t.C800010016 else 0 end) as 反馈次数 from aaa
when t.C810000005 = '专题' then t.C800010009
when t.C810000005 = '资源' then t.C800010016
else 0 end as 反馈次数
from aaa
select
(
case t.C810000005
when '查询' then t.C800010007
when '专题' then t.C800010009
when '资源' then t.C800010016
else 0
end) as 反馈次数 from aaa