A better way to explain my question is like this
List the names of someone whose names contain a given string. For example, if the given string is "John,", the system will display the names of every person whose name contains "John", such as "John Smith", "Elton Johns", and "johnny H".
I couldn't explain it in the question and trying to find what I'm looking for on Google when I can't phrase is right is difficult