Ecclesiastes 7:15

Amplified Bible (AMP)
I have seen everything during my [fleeting] days of futility; there is a righteous man who perishes in [spite of] his righteousness, and there is a wicked man who [a]lives a long life in [spite of] his wickedness.

Read Ecclesiastes 7:15 in other translations