I am not sure about which of the following forms would be correct:
I was pursuing my passions studying CS at University
I was pursuing my passions by studying CS at University
I was pursuing my passions when/while studying CS at University
What I would like to say is: I was very passionate about something so it was a obvious next step that I went studying CS (and then I have received my MSc).
None of them are correct. From your explanation it feels like you have already completed your course, therefore the correct alternative is:
I pursued my passion by studying CS at the University.
The task is finished and you received the degree, hence you have to use simple past i.e. ‘I pursued’ instead of ‘was pursuing’ because ‘was pursuing’ indicates that you are still pursuing the degree from some point in the past.
You pursued a single passion i.e. of studying CS and therefore instead of writing ‘passions’, write it’s singular form i.e. ‘passion’.
If you use ‘while’ then it will change the meaning of the sentence.
For example: “I pursued my passion while studying CS at the University.” means that ‘You pursued a different thing (which is your passion) while studying CS in addition (i.e. CS isn’t your passion).’
Also, ‘when’ has no significance in this context.
Hope, this helped 🙂