You cannot compare two fields using the query function. I wrote a query that compares them using a set of nested conditions based on our naming convention. Our releases are quarters, and we use the naming convention yyyyQn, for example 2017Q4. My nested queries match first the year (I built it out for 2017 and 2018 so I won't have to update it anytime soon) and then the quarter like this:
(
((Feature.Release.Name contains "2017") AND (Release.Name contains "2017"))
AND
((Feature.Release.Name contains "Q1") AND (Release.Name !contains "Q1"))
etc...
)
It's laborious to build out, but it works reasonably well.