Captive consumption by the same unit is not a supply. (it is part & process of manufacture) captive consumption by a another unit within same state is not taxable. captive consumption by a unit in another state is taxable.
Read more at: https://www.caclubindia.com/forum/captive-consumption-in-gst-407249.asp