case when 似乎是不能用在where后面的and中了,where(case when), 用在select中倒还可以。where中进行if逻辑,可以用decode函数,或者用and or 连接模拟if条件。不正确的话,请指摘。