Both are very similar, X2 is probably better in level design as it's a sequel. However, I recommend you to get the first one. X2 continues the story of X, so you'll probably won't understand a few things or at least you'll know the characters first.
Both are excellent games anyway, but I'll go with the first one as I liked the music more.
Castlevania Judgment FC: 1161 - 3389 - 1512
3DS Friend Code: 3480-2746-6289
Wii Friend Code: 4268-9719-1932-3069