I liked “Yesterday’s Enterprise”. Again, I was never a fan of TNG, but they nailed it in several episodes. I don’t know the name of the episode, but there was one where Q takes Picard to the dawn of time and Picard touches a pool of water, causing ripples that changes the entire course of the universe.
That was the final episode.
Another good one.
Q saves humanity.
This is the one you were thinking off, the lat episode of TNG:
http://memory-alpha.org/wiki/All_Good_Things