Toughest question ever. Wow. Both games were amazing in their own way. I'm going to do my best to get through this without completely reviewing each game. Here goes.

I'm not even going to compare the gameplay. I like both, they're just different. I'll just talk about the stories instead.

Both stories were amazing in their own way. IX was really more about the characters and how their journey changed them. XII was much a much more epic and political game. I really, really like both kinds of stories, with each having their moment. For me, IX's defining moments were on the second disc, journeying across the Outer Continent. All of those small character development scenes (for example, when you rest at the inn at the Black Mage Village) just made the game for me.

SPOILERS THROUGHOUT THIS PARAGRAPH.
XII, however, was all about the different motivations of the major players and how they interacted with each other. Vayne, for instance, was only trying to help humanity break free of the control of the Occurians. His source of power (Venat) and his methods were evil, but his basic motivation was justified. The Resistance simply wanted to break free of Archadian rule. Vaan simply wanted adventure and went along for the ride. I could go on, but I won't. How these different purposes cross paths is what I like about the game. All the political maneuvering and the epic scale of the game really appeals to me (that's why I love Xenosaga so freaking much). The setting was also amazing and deep, and that's a major plus and something I think was missing in IX to some extent.

The choice is really tough for me. I'm going to have to go with IX. Some scenes were just so beautiful and emotional that I was just awestruck. XII was just missing that, IMO. But based on the story, the choice would probably be based on whether you personally prefer heavy character development or heavy plot and setting development.