I would like to concatenate column names in a way that the first part of the column name is a string and the second part is a number which is the result of another query.
I don't believe you can do this with CONCAT() and CONCAT_WS(). I'd recommend using the langauge you are working with the create the field names. Doing it this way would be pretty scary, depending on where the data in the database came from.