title: combine sql queries into one using IF
body: <p>I have three sql queries which retrieves results from different conditions and I want to combine these queries into one using IF statement.how can i do that?</p>