my code in asp.net with sql server

my final task is to perform string matching and i know i use algorithm but i can use logic first i split the code in listbox .success

2nd step i match all the listbox items to sqlserver which contain 1 column ? how to match all the listbox item to database sql server ?

for example in my database

heading
factorial in c++

when i enter query box factorial in java and then split to listbox like
factorial
in
java

that work done

but how to match the listbox all items to sqlserver for better result ?