I have a table
select points from users where user_name like user4
Sounds like all you're looking for here is validation. Your SQL statement as written will work fine if you simply add single quotes around
user4. The only other thing I would change is to use
= in place of
like keyword is typically only used when doing a wildcard matching which you are not doing in this case.