Tienes que usar el operador LIKE asi:
LIKE
SELECT"SELECT * FROM tablaTERCEROS WHERE codigoTrTERCERO LIKE '%2365%;'%" + TBNit.Text + "%'"
SELECT * FROM tabla WHERE codigo LIKE '%2365%;
"SELECT * FROM TERCEROS WHERE TrTERCERO LIKE '%" + TBNit.Text + "%'"