When you use like
you have to include wildcards as well as the search term:
select * from names where forename like 'John%'
will find all names that start with "John"
select * from names where forename like '%Smith'
will find all names that end with "Smith"
select * from names where forename like '%g%'
will find all names that have a lower case "g" in them.
So if you are passing the search string as a parameter you'll need to build up the like
statement:
select * from names where forename like @SEARCHKEYWORD + '%' or
surname like @SEARCHKEYWORD + '%'
will find names where the forename or surname start with the search keyword