try this->
strTemp:='memo like ''%'+strSearch+'%''';
for i:=length(strSearch)-1 to 1 do
strTemp:=strTemp + ' and memo like ''%' + left(strSearch,i) + #13#10 + mid(strSearch,i+1,length(strsearch)+'%''';
strquery:='select * from table1 where ' + strTemp;