I have a few tables tables, one of which has a column which contains part of the name of the other tables.
So basically I am trying to get this half name by running
SELECT subName FROM table_1 WHERE condition
And the result of this would be used in a second query to search for something in the specific table, for example
SELECT TOP 1 * FROM fullTableName ORDER BY someColumn
...