'Populating Q&A Chatbot Database on MySQL - How do I specify a reply to keyword and not every character of the word?

I'm trying to populate a Q&A chatbot database on MySQL. What I want is something like this: if the user types "hello" the bot's reply should be "hi". If the person types anything else, the bot returns with an error message.

The problem I'm facing is that the bot is replying "hi" to any character of "hello" submitted, e.g. h,e,l,o. What can I do to make the responses keyword-specific? Thank so much.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source