Use dynamic sql query like below
declare @TableName varchar(max)
declare @type varchar(max)
set @TableName='test'
set @type ='''abc'''
declare @SQLQuery varchar(max)
SET @SQLQuery = 'SELECT LETTER_ID FROM '
+ @TableName
+ ' WHERE LETTER_TYPE
= ' + @type
print @SQLQuery
execute(@SQLQuery)