Fable about post-hoc rationalization

Not sure where this belongs; please feel free to move. I have the faintest memory of a fable or parable or joke about a man who made up his mind about what had happened, and when each of the pieces of evidence he cited as a basis was disproved, he turned it around to justify his original position. So he knew X was true because Y was true, but then when it turned out Y wasn’t true, well, that proved X was true. I realize I’m not giving you much to work with, but does this ring any bells? Thanks!

Since no one has replied I think it might do better in CS.