Ecclesiastes 7:25

7:25 I turned around, and my heart sought to know and to search out, and to seek wisdom and the scheme of things, and to know that wickedness is stupidity, and that foolishness is madness.
-World English Bible

Other Translation

7:25 I applied mine heart to know, and to search, and to seek out wisdom, and the reason [of things], and to know the wickedness of folly, even of foolishness [and] madness:
-King James Version