Dropdown fetching database table by ID

I have 3 radio buttons on my form A , B , C but when i clicked on A radio it shows specific dropdown which get data from database table but by fruitid 1 and when i clicked on B it will show data fruitid 2 as onnword. i need to show table data by specific fkid Id.

Table name--ABC
id| fruitid   | name
1 |  1        | Apple
2 |  1        | Mango
3 |  2        | Veg-1
4 |  3        | Juice-1

//////////////////////////////////////////////////////////////////

<select>
$getdata = mysqli_query($conn, "SELECT * FROM `ABC` WHERE `fruitid`= '$fruitid');
if(mysqli_num_rows($getdata) > 0){
                         while($data= mysqli_fetch_assoc($getdata)){
                          $tid   = $data['fruitid'];
                           $name = $data[' name'];
                    ?>      
                <option value="<?php echo $tid; ?>"><?php echo $name; ?></option>
                            <?php
                            } }?>
                    </select>

I want to get values in drop down by ID. as you see Table has fruitid it comes from anthor table and 3 radio buttons on the form when i click A radio it will show fruitid 1 and when i clicked on 2 it will show 2 fk accordingly . but now am stuck here ? any guideline please