This can be achieved using automatically discount functionality.
You can offer your customers discounts that apply automatically at checkout. You can create automatic discounts only for buy X get Y promotions.
And then put your list in your product page to show what discount they will get.
For an automatic discount to apply correctly, your customers need to add all eligible items to their carts before they move to checkout. This includes the items that they need to buy to qualify for the discount as well as the items that they get as part of the promotion.