Sorry for the title, I could not come up with a better one.
Basically, I have the following query
SELECT Id, (SELECT Name FROM Prod__c WHERE Id = Case.Id) FROM Case limit 20
So what I want to achieve is to use the result Id from the query on the sub-query. It is some internal SF Id, and the name I need is in Prod__c. When trying it like this I get the following error:
Bind variables only allowed in Apex code
I'm not sure if what I'm trying to do is even possible. But any help is appreciated.