How to selected unit_pirce when item_testname_id?

                    <select required="" onchange="CalculateTotal(this)" id="ctrl-item_testname_id-row<?php echo $row; ?>" data-load-select-options="unit_price" name="row<?php echo $row ?>[item_testname_id]"  placeholder="<?php print_lang('select_a_value_'); ?>"    class="custom-select" >
                        <option value=""><?php print_lang('select_a_value_'); ?></option>
                        
                        <?php 
                        $item_testname_id_options = $comp_model -> pat_direct_billing_list_item_testname_id_option_list();
                        if(!empty($item_testname_id_options)){
                        foreach($item_testname_id_options as $option){
                        $value = (!empty($option['value']) ? $option['value'] : null);
                        $label = (!empty($option['label']) ? $option['label'] : $value);
                        $selected = $this->set_field_selected('item_testname_id',$value, "");
                        ?>
                        <option <?php echo $selected; ?> value="<?php echo $value; ?>">
                            <?php echo $label; ?>
                        </option>
                        <?php
                        }
                        }
                        ?>
                        
                    </select>
                    
                    
                </div>
                
                
            </td>
            
            
            <td>
                <div id="ctrl-unit_price-row<?php echo $row; ?>-holder" class="">
                    
                    <select required="" onchange="CalculateTotal(this)" id="ctrl-unit_price-row<?php echo $row; ?>" data-load-path="<?php print_link('api/json/pat_direct_billing_list_unit_price_option_list') ?>" name="row<?php echo $row ?>[unit_price]"  placeholder="<?php print_lang('select_a_value_'); ?>"    class="unit_price custom-select" >
                        <option value=""><?php print_lang('select_a_value_'); ?></option>
                        
                    </select>
                    
                    
                </div>
                
                
            </td>

Maybe this will help:
https://www.youtube.com/watch?v=QJjey7uag74

thanks for reply @SamTanner sir…i m asking about how to create automatic selected…when item filter option selected and automatic display in another selected option…

Could you please explain better?