Support CASE statement in query 1. Pending testcases