The recently released The Witcher 3: Wild Hunt Hearts of Stone expansions comes with two endings, determined by a decision you take in the final quest. Before it starts, go to Shani, complete the sub-quest she will assign you in order to learn how to challenge O'Dimm. Then, you will meet O'Dimm and Olgierd, and have two options: help Olgierd (this is the good ending) or don't react (which is the bad ending). Both come with specific tasks to be completed and rewards.
Helping Olgierd, you will go into O'Dimm's realm, where you'll have to solve his riddle “Reflection”. Once it starts, go to the mansion you will find along the road, then find a fountain. Use the Aard sign on the wall you'll see there, and watch the cut-scene starting. The final reward for this is a very good steel sword.
Otherwise, O'Dimm will take Olgierd's soul and provide you one wish among the following:
This is definitely up to you.