JSFiddle - React, Tailwind, and code Playground

HTML

<select id="selectBox">
    <option value="" >Select</option>
    <option value="1">1</option>
    <option value="2">2</option>
    <option Value="3">3</option>
</select>Coord 1:
<input type="text" name="coord1">
<br>Coord 2:
<input type="text" name="coord2">
<br>Coord 3:
<input type="text" name="coord3">
<br>

JavaScript

$("#selectBox").change(function () {
    var index=this.value-1;
    $('input[type=text]:gt(0)').prop('required', false);
     $('input[type=text]:eq(0)').prop('required', true);
    $('input[type=text]:eq('+index+')').prop('required', true);
 });