there are many ways of doing this, the most simple of this is as mentioned by you that is using OR and LIKE
eg: select name from names where name like"%a";
this will give you all the names ending in 'a'
other ways involve using regexp() (check out at php.net) to match the searched string in the table entries.