I achieved this funcionality in Magento 1 doing the following:
- Created an attribute "sizetable" with options "tshirts" and "dresses".
- Assigned the respective attribute value for each product.
- Created 2 blocks with identifiers "tshirts" and "dresses".
- On the product template I added the following code:
<?php $sizeguide = $_product->getAttributeText('sizetable');
if ($sizeguide): ?>
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId($sizeguide)->toHtml() ?>
<?php endif; ?>
However this process does not work in Magento 2.