select case when '${指标}'='季度' then jd else '' end as jd,
case when '${指标}'='月度' then yf else '' end as yf
end from aaa 根据参数取不同字段,返回2个字段
select case when '${指标}'='季度' then jd else '' end as jd,
case when '${指标}'='月度' then jd else '' end as yf
end from aaa 根据参数取相同字段的不同记录的值,返回2个字段