How open door after answering some questions

hello Iam student and need to help
Iam need blueprint of open door if player or character near from door show questions and if answer correct the door open and if dont answer correct the door not open
Iam need tutorial can help me