First, if St_Code is a numeric field in your table, you're treating the search text as a string in the query. This SHOULD result in an exception generated by the database because of a data type mismatch.
If this code was copied and pasted into this question, there is a space in your WHERE clause between the single quote (') and the text your appending to the query string. Your query looks like this:
Select Name from State_Mast where Name = ' Text'
That little space is probably what's screwing up your query where it's not returning any results.
Also, use parameterized queries, not string concatenation, to build queries! Google for "VB.NET MySQL Parameterized Queries" and "SQL Injection Attack" to find out why what you're doing is so bad.
Using parameterized queries would have also prevented this error from happening at all.