select
case when
(select
STRPOS(
trim(lower('abc.com')),
trim(lower('xyz'))
)
) > 0
then
1
else
2
end;
To test this code put your first string instead of 'abc.com' and second string at 'xyz'. If your second string present in first string it will output 1 else 2.
Hope this will help.