Example:

You hold TT or JJ and flop comes 997.
Many players will bet the pot on the flop with a hand like A7 or 87 here.
Still there is a possible 999 set hanging around. So, someone bet the pot before you and there is one or no other callers before you play.
How should this best be played

TT and JJ is not very confident hands for me. If anyone could explain with details I would be happy