If you "obey the law more often if there's a chance that you may get caught" then you are doing something to get caught and you are breaking the law. If you are a law abiding citizen, the answer to the question would be no.
The question is asking if you do the right things because people are watching or because you are a good person. I would answer
false because I do the right things because of my conscience not because society tells me it is right or wrong.
I obey the law more often if there a chance that I might get caught