Hi Daniel,
It depends on the licensing model you're using. If you just bought Kentico 9 version with no maintainance you'd need to buy a new license for Kentico 12 (this is m understanding may be worth checking with the official support). But if you have maintainance, you can just upgrade your existing license keys on the client portal.
When you upgrade the license from 9 to 10-11-12 you will see licenses per each version for the same domain and they all will be working with appropriate Kentico version.