When a company splits (demerges), you get shares in the new company based on a set ratio. Your original investment is divided between the two companies based on their market value after the split.
For example, if you invested ₹50,000, a certain percentage will stay with the parent company, and the rest will be for the new company. This split is based on the cost of acquisition and varies for each demerger. Always check official updates for exact details.