title: Run SQL Dynamic using column value
body: <p>I am using dynamic SQL.</p>
  <p>I inserted a select statement into one row from <code>#example</code>, I want to call that select statement and run it with dynamic SQL, my select stored has a variable call @NumOrder</p>
  <pre><code>create table #example(id int, description varchar(1000))
  
  insert into #example(id, description)
  values(1, 'select case when name=''Carlos'' then ''Pass'' else ''FAIL'' from server.dbo.person where number = @NumOrder')
  
  declare @NumOrder int, @SQL nvarchar(max)
  
  set @NumOrder=2621
  set @SQL='description' 
  --here is where I want to call my query and is failing 
  --once I filled @NumOrder I want to display the results
  exec(@SQL)
  </code></pre>
  <p>I want to run this dynamic SQL using a row stored into the temp table, I know that I can put the complete select statement into the @SQL and works but I want to know if there is a way to call the select statement in a row stored from a table. Is there a way to do this?</p>