The correct option is B if
Here, the second part of the sentence is showing a possibility of something happening. So, the right word to express a possibility is 'if'. 'When' shows that 'once one event is completed, another event will occur'. This also seems like a likely option but the word 'might' in the first part of the sentence conveys that it is only a possibility, and not a confirmed event. Hence, we cannot use 'when'.