To do this you will need three instances of the the Vienna Instrument, each playing a different organ sound. Although the VI can switch instantly between its patches, it is not multimbral and therefore you have to assign a single VI to each separate MIDI part.
>My first idea was to record the melodies with my keyboard and then choose the right instruments for the first manual, second manual and pedals of the organ.
Simplest method is to play the three parts separately so you end up with three different MIDI tracks, each assigned to a different VI organ sound.
Alternatively, you could play the upper and lower manual parts in one pass and then edit them into two MIDI tracks - the advantage of that approach is that the performance will be unified. Unless you've got a MIDI pedal board I guess you'll have to record the pedal part as an overdub!
Good luck!