In your picture it really doesn't look like it should be all too stuck, but then pictures don''t always tell the whole story, right.
Anyway, if by "the whole wheel turns" that's not an issue because it only goes so far then stops. If you mean that the ball stud has broken free from the knuckle, then in a way you're lucky because it'll be easy to separate after the nut is off.
Jack up the ball joint forcing it into the knuckle. Tighten the nut about maybe 1/2 turn so the ball stud is pulled into it's hole where it used to belong. Unscrew the nut.
Tightening the nut first may not be necessary, but if you start unscrewing the nut and the stud starts turning on you again just as it's almost off you'll wish you had done it.