As John F. Kennedy said, "Leadership and learning are indispensable to each other." So when answering this question, showcase how you take advantage of every time something doesn't go according to plan as a learning opportunity. The surest way to succeed is to fail, learn from your mistakes so as not to repeat them, and try again.
When answering behavioral-based questions such as 'When have you...,' be sure to apply the STAR method of Situation, Task, Action, Result. Briefly describe the project, what your expected task was, the actions that you took, and the final result. Share information on the lessons that you learned from the experience. The ways you answer should show the interviewer that you are someone who learns from failure.