DECLARE @SQL nvarchar(4000),
 @sTable varchar(20) = '@tbl',
 @sIDColumn varchar(20) = 'OrderID'
 --,@ID int = 10248
 
 declare @tbl table
 (
 id int,ntitle varchar(20)
 )
 
 insert into @tbl(id,ntitle) values(1,'One')

-- SET @SQL = 'SELECT * FROM @tbl WHERE id =1'
  SET @SQL = 'SELECT * FROM test where id =@Key'

  EXEC sp_executesql @SQL,N'@Key int', 2