There is no such construction possible in SQL. In SQL you “SELECT some_colums FROM a_table” basically. But it would be possible of course to loop through all possibilities with some code. This is what you would typically write a client script or a Stored Procedure to do.