Additional salary based on salary component not the amount

is there any way to buy additional salary base on salary component not amount i want to add like base +5% from additional salary