The keywords here are "randomized response". There are some interesting variations (from the Wikipedia page):
The sensitive question is worded in two dichotomous alternatives, and chance decides, unknown to the interviewer, which one is to be answered honestly.
Alternative 1: "I have consumed marijuana." Alternative 2: "I have never consumed marijuana." The interviewed are asked to secretly throw a die and answer the first question only if they throw a 6, otherwise the second question.
If you have a lot of people to question about something, and they have a motivation to lie, consider this clever use of a six-sided die.