Although the other answer does give a solution, I believe that I did not want to normalize the table to get the result, you just want the facilitator to mount the query . Changing the modeling because of this would be absurd.
In the comments asked about the type of columns. I do not know what fancy solutions are thinking but I doubt it's legal to use.
The only way I can see this is to use a data dictionary .
This is an old technique that almost everyone ignores, for one reason or another. Almost everything I do in database is on top of a data dictionary, so it gives me ease and flexibility.
In it you will have information about how the database is structured. So it controls the access to the data. If you need to change the bank structure, the change will be made in the dictionary and an application will apply the changes from the modification made in the dictionary.
Among the many advantages, it can also be used to assemble your queries as you wish.
In this case the columns would have a form of grouping or labeling that indicates that these columns have a specific meaning, when adding a new column to this table in the data dictionary with this tag , its code you will know that to generate the query you will need to get all columns with the tag and you will immediately be using it.
Making the data dictionary system is not something simple and if it is just for this, it is also absurd. But there is no simple solution.
I will not go into more detail about the data dictionary that is not the focus of the question, but anyone who wants higher applications should learn to work with one.