First of all, split lines based on line breaks like
List<string> lstLines = new List<string>(
txtYourTextBoxId.Split(new string[] { "\r\n" },
StringSplitOptions.RemoveEmptyEntries));</string></string>
Then you may query like-
SELECT COUNT(*)
FROM YourTableName
WHERE Colx LIKE '%'+@line+'%'
Now execute in the loop for all the values in
lstLines. Now implement rest of your logic.
If you need further help, please let me know.
Hope, it helps :)