In India, the old sales tax, vat everything comes under GST.
Can anybody explain with an example, how to set a tax rate and rules to each product?
you need to create 2 types as CGST and SGST for within states and IGST for all over india. please go through below link for more details :
you should refer to this blog post http://www.credevator.com/how-to-configure-gst-in-magento-2/