racchiude la query dinamica in un blocco IF che verifica se la query restituirà qualcosa.
select 'if exists (' + QUERY + ')' + char(10) + ' ' + QUERY
from (
select QUERY = 'select * from ' + TABLE_NAME
+ ' where ' + COLUMN_NAME + ' = 123'
from INFORMATION_SCHEMA.COLUMNS
where COLUMN_NAME like '%columnOfInterest%'
) q