There is no way to do a *
with a comparison in Oracle (or really in any other database). You can, however, use in
to facilitate the comparisons:
SELECT column_name
FROM Customers
WHERE CustomerNo = 1 AND 'Y' in (column2, column3, column5);
You can get the list of columns in a table from a system view such as all_tab_columns
, if you don't want to type them out individually.