I have one table with specific columns in which there is a column that contains comma separated values, such as test, exam, result, other .
I will pass a string, such as result, sample, unknown, extras, as a parameter of the stored procedure . and then I want to get related entries by checking each phrase on this line.
Example:
Tablea
ID Name Words
1 samson test,exam,result,other
2 john sample,no query
3 smith tester,SE
Now I want to find the result, sample, suspense, additional functions
Then the result should be
ID Name Words
1 samson test,exam,result,other
2 john sample,no query
because in the first record the result matches, and in the second record the pattern matches.