QR codes can contain any text. The convention for their use as a link to the Web is to contain one URL. Most QR reader apps will then load the webpage referenced by the URL embedded in the QR code.
There is no way to embed information in a QR code that directly links to two different URLs when read by any QR code reader. A custom QR code reader could parse a QR code with two URLs and decide which URL to follow, but you'll have to figure out a way to get your custom QR reader to your customers.
The functionality you're looking for can reside at the URL in the QR code. The embedded URL could link to a webpage that checks user agents and redirects appropriately. If the Safari on iOS user agent is detected, redirect to Apple's App Store. An Android user agent would be redirected to an appropriate app store. I would set all other user agents to go to a product page with links to both stores.
If I was doing this, I would investigate sending all users to a product page. The opportunity to engage in further marketing of the product, sharing more information with the potential customer may result in better sales. I'd set up some A-B testing to see which is better.