I guess you mean a Column Expression in the Records Window rather than a Query which is something rather different but would have exactly the same difficulty.
The short answer is "no".
It might be possible with a very complex expression but it has to cope with a great many possible relationships.
e.g.
1st cousin once-removed
1st cousin once-removed's wife
1st cousin once-removed's partner
1st cousin twice removed
1st cousin twice removed's wife
1st cousin twice removed's partner
1st cousin 3 times removed
1st cousin 3 times removed's wife
1st cousin 3 times removed's partner
2nd cousin once removed
2nd cousin once removed's wife
2nd cousin once removed's partner
3rd cousin
It would be easier if a Plugin script could be invoked by the Expression to perform the conversion.
But that needs Wish List
Ref 547 Run Plugins via Expressions to be implemented so please Vote for it.
This is another request that has been pending for nearly 7 years.