Parsing SQL string to get a top level WHERE clause in C#

I need to get a main WHERE clause from complex SQL query with a lot of sub-queries inside main SELECT and WHERE clauses in C#.

I can't use Entity SQL because it requires opening a connection with the database. I did not find Microsoft.SqlServer.Management.SqlParser.Parser helpful as well because it doesn't provide a query tree.

I have some query:

SELECT column_1, column_2, column_3
FROM (SELECT name column_1, surname column_2, age column 3
      FROM table_2) table_2
WHERE (table_2.column_1 in (select * from table_3 where column_1="some value"
       and table_2.column_2 in (select * from table_3 where column_1="some value")
       and table_2.column_6 = "some value")
ORDER BY table_2.index

And I want to get a main WHERE clause:

(table_2.column_1 in (select * from table_3 where column_1="some value"
       and table_2.column_2 in (select * from table_3 where column_1="some value")
       and table_2.column_6 = "some value")

What is the best way to do it?