The exchanges are not mapped to the stocks in your demat account. You can sell them on BSE or NSE, irrespective of the fact where you purchased them from. Your investments will show the exchange price where the previous closing was greater. 

In most cases, the price on both exchanges is the same, however, at times there can be a price disparity due to a corporate action, IPO, or difference in the tick size. 

If you choose to exit your investments without checking the price on both exchanges, then you are typically expected to sell on the exchange where the price is higher. However, you should still verify the prices on both the exchanges as this feature works on the previous closing price and not live trading price.