Passa i nomi delle colonne come parametri
DECLARE @COLS NVARCHAR(MAX)
DECLARE @TABLE NVARCHAR(MAX)
SET @COLS = 'COL1,COL2'
SET @TABLE = 'TABLENAME'
Ora esegui la query
DECLARE @QRY NVARCHAR(MAX)
SET @QRY = 'SELECT (SELECT '[email protected]+' FROM '[email protected]+') FROM sourcetable'
EXEC SP_EXECUTESQL @QRY