Ver originalDECLARE @query nvarchar(MAX)DECLARE @campo VARCHAR(30)SET @campo='campo'SET @query='select ' + @campo + 'from tabla where ' + @campo + '=condicion'EXEC sp_executesql @query