The use of this type of に is limited to the cause of a psychological reaction.
- When do you use に to indicate a cause or reason for something?
- に in コントロールに苦しまなくなった
- How does ''ni'' fit in here?
In your example, とある質問に and とある質問で are completely interchangeable, and I can feel no difference. In simpler and fixed phrases like ~に驚く and ~に怒る, に should be used.
休む is not a psychological reaction, so you cannot say 風邪に会社を休む.