Comment on Policy on settlement of compulsory delivery derivative contracts
Firstly, which scrip are you trading in? Is it physically settled or settled using cash mode?
Answering your question, if your position is closed before expiry, it will be cash settled, regardless of settlement type.