I don't know how to get all the endings, but to win the chess game you have to basically not take any risks and play it safe the whole time (at least that's what I did) :)
There's multiple ways to win, that's so cool! I feel like the developer must've based the choices on a real move-by-move chess match with multiple endings, then. I won by not taking one obvious opening that he seemed to know about, but mostly taking the bold and risky approach otherwise.