I would suggest:
document.querySelector('div.selector option[value=valueB]').text = 'Value whatever';
Further, in response to questions raised in the comments:
I need to get only the second element <option>with the same value as the other <option>, and change the text only to the second<option>
To get all items <option>with value="valueB":
document.querySelectorAll('div.selector option[value=valueB]')[1].text = 'Value whatever';
, document.querySelector() ( ) CSS- node ( a NodeList), ; document.querySelectorAll() NodeList, ; ([1]) node / .