how to migrate my account keeping all the tasks?
Unfortunately, you can't directly migrate one Todoist account to another, but you could simply change the email addresses of these accounts if that's what you want. Please clarify for what purpose exactly would you want to migrate - to add more data and combine data from two accounts or just use a different email?
I want to buy premium license but if I switch to another company I want to change the e-mail and keep using it.
That's possible. You can click on the gear icon in the top-right corner, go to Settings -> Account and change the email address associated to your account anytime.
The Premium status is linked to the unique ID of your account so what email you decide to use with your account or change it, won't affect the content or Premium status of this account.