How to calculate EPF base on a table?

Hi all,

I want my payroll to calculate base on a pre-create doctype table, I’ve created it, and call it “Rate of Contribution”, pic as below:

How can I create formula to get the EPF rate while creating new payslip?

Thanks.