How to set item tax template to auto set according to unit price

In purchase and sales if the unit price is less than 1000 then it should set gst 5 % as item tax,if its greater than 1000 then it should set gst 12 % as tax.