He doens't have a random hand if he raised now does he. If you have no reads on him than you have to assume he is competent. Depending on preflop action would determine how I played this hand. There is not enough information in your example to say what play would be correct however capping does seem a little silly here. The question is should you call the third bet and what actions should you take on the turn.
I'll try to use your example.
Let's say you were in late positon and raised with 99, everyone folded expect the big blind who called (2BB) we will just assume the small blind is gone to the rake at this point.
the flop is Q
6
2
Villain bets,
should you call or raise. I would probably raise for a free card here. and you have showdown value. So if he calls you have a pot with (4BB) and if he raises you have to call .5BB to win 4.5BB which is 9:1, you have to figure you have 2 outs now, which gives you 5% chance of catching a 9 on the turn and a 10% chance of catching by the river.
This looks like an easy fold, but let's say you can get 1BB on each street if you hit on the turn, you are really getting 6.5BB with a .5BB call. which is now 13:1 or about 7%. Pretty close to worth calling especially if he is likely to raise on the turn. Based on this I like calling.
So, the line I would take here if villain bets into you is raise on the flop. Call if reraised. Check or Fold on the turn. I would probably make a crying call on the river if I get there unimproved.