I have a number of queries that contain multiple columns and I would like to run a single query to test them in order until one subquery returns results. I have found that a COALESCE statement only allows you to use and return a single column per sub query, which will not work with my data set:
subquery1 = SELECT col1, col2, col3 FROM table1 WHERE x = y
subquery2 = SELECT col2, col4, col7 FROM table2 WHERE t = p
subquery3 = SELECT col5, col8, col9 FROM table3 WHERE v = b
Is it possible to test each of these queries in order until one of them returns rows?