The best way to achieve what you want is to create a custom module for this. You can follow below approach for this.

1) Create a product attribute for example: `free_gift_sku` with type as dropdown and enter sku of all the free gift products. Associate this attribute with each products

2) Now while creating the product, select the `free_gift_sku` value as the SKU of the product which is required to be added as free gift for that product.

3) Observe an event `checkout_cart_product_add_after` and get the details of the product added to the cart through `quote_item`. You will get all the details of the product which also includes SKU of the free gift product.

4) Now programmatically add the free gift product to the basket. You can define the logic of adding the product as per your requirement.

Please Note: The code for observer and adding product to basket programatically is different for Magento1.x and Magento2.x. Digging into the code/Googling it will help you out. 

To save you some time, please check this thread to add product to cart programmatically in Magento2  

[Magento2 - How to add a product into cart programatically when checkout_cart_product_add_after is fired][1]

Hope it helps


  [1]: https://magento.stackexchange.com/questions/115929/magento2-how-to-add-a-product-into-cart-programatically-when-checkout-cart-pro