But when Paul perceived that the one part were Sadducees, and the other Pharisees, he cried out in the council, Men and brethren, I am a Pharisee, the son of a Pharisee: of the hope and resurrection of the dead I am called in question. ~ Acts 23:6 KJV
How did Paul get out of this situation? He got out by the working of the gift of a word of wisdom. Once the Holy Spirit opened his eyes about who he was speaking to he associated himself with the Pharisees by letting them know he was a pharisee too. This was the wisdom that the Lord provided in this instance. And because he spoke this he was able to cause division among them and have the Pharisees side with him.
Just when you thought there was no way out of something the Lord can provide a word of wisdom for your situation and help you escape or move forward. The gift of the Word of Wisdom is one of the 9 gifts of the Holy Spirit. You can read more about the baptism of the Holy Spirit in 1 Corinthians 12. If any of us lack wisdom he said we just need to ask for it.
If any of you lack wisdom, let him ask of God, that giveth to all men liberally, and upbraideth not; and it shall be given him. ~James 1:5 KJV