There are two separate issues.
First, the passive form: Ask, as a ditransitive verb, potentially has two passive forms.
You are asked the question
The question is asked of you.
Both are grammatical, but the first is much more common in speech: the second is rather literary. They both have the same meaning.
Second, the conditional. For irrealis (or counter-factual) conditionals, the traditional grammar is to use the so-called "past subjunctive" form; but in modern English, only one verb retains a distinct form for this: were as opposed to was. For every other verb, it is indistinguishable from the simple past.
So for example
If I did see him ...
is historically a different form from the simple past.
But in the case of was, the traditional form
If I were ...
is used for conterfactuals (as opposed to the simple past for non-counterfactuals, such as If I was there at the time, I didn't see anything, where the speaker may have been there at the time).
Having said all that, many speakers today never use the were form, and say if I was in all senses. But traditionalists still count that as "wrong".
So If the question were asked of you ... is perfectly grammatical, but a bit literary, and most people would say If you were asked the question ....
(I don't think many people would say If the question was asked of you ..., because the literary form was asked of you doesn't sit well with the colloquial if ... was; but some people might say it).