Hi,
The easiest way will be to not display the add to cart buttons by disabling them in the configuration and then edit views in order to add your custom button.
To have a dynamic comportment, I think that using custom fields can be a good thing. Create a custom field in the table "product" with the type "text", then in the product edition page, you can set a different url for each products.
Finally edit the view "product / listing_img_title" (for the product listing) and/or "product / show_default" (for the product page) and add custom code like:
<input type="button" class="button btn" onclick="javascript:window.location='<?php echo $this->element->CUSTOM_FIELD_NAME; ?>'" value="<?php echo JText::_('ADD_TO_CART'); ?>"/>