ps. this is not a game scenario. I have just used the pieces I want to focus on.
Which castle pawn to move when queen threatens checkmate?

I assume you mean 1...g6 or 1...f5. After 1...h6, White still has a mate in 1.
It really depends upon the specific position. But to answer your question, it's probably g6 more often than f5, assuming this is Black's only resource. Moving the f-pawn probably will weaken the b2-g8 diagonal too much.
It depends. You should play g6 if the weakness of the dark squares is not important. (You have a dark squared bishop, or your opponent does not have one) You should play f5, if it is important to not weak the dark squares. h6 does not change anything, it is still a mate after h6.

sorry I got the position wrong. I played OTB in the evening and didn't remember the position. Yeah I can see after h6 it's still mate. Here is the actual position.
The position was like this. We both had more pieces which I don't remember.

The example would be better if you had the queen on the h-file.
that's what I was aiming for.

In your example h6 gives your opponent a mate in one. That should solve the problem :D
If you switch the position of queen and bishop however it's another story. Usually as a rule of thumb g6 weakens the dark sqares while h6 makes you more vulnerable to pawn pushes on the king side.
But as you already mentioned there is no such thing as a "general rule" in chess, so it's always better to calculate than trying to exclusively think in patterns.
Do you move g6 or h6? I know it depends on position of other pieces but what do you find better?