Try to change @nm
type to varchar as below
declare @nm varchar(100)
select @nm = 'abc'
select some_field from TABLE where nm_field like ('%'+@abc+'%')
Char
type has constant size and db fill a gap using spaces
declare @nm char(100)
select @nm = 'abc'
below select
select @nm
will return abc and 97 spaces.