It's quite easy and similar to setting up a regular Variable product.
1. Open "Variations" tab in your product options (on product edit's page). Create some variations the same way you do for any regular Variable product.
2. Then in one variation check "Subscription" checkbox (next to "Downloadable", "Virtual", etc.):
3. You will see how additional Subscription fields appear for this variation:
Configure those fields as you like.
4. Do the same for other variables - note that you can use different prices and length for each, e.g. set 30 days for one, 60 days for other, 100 for third, etc. + different prices for each as well.
The same method can be used to create both the subscription and single-purchase option within one product.