Installing a custom certificate for webserver?

I want to have different sub-domains with ssl certificates for each one example:

Or do I need a wildcard certificate?