Support case expr in query

generally support case-expr and if-then-else in obs and query

@lileicc