Retrieve data using wpdb to use for customizer controls

So it seems that there maybe two issues here first it seems that you are not establishing a new instance of a WP_Customize_Control like below and also it is important to remember that you have to give at least the min array items to both the setting and the control or it will not show, you had an empty array in the setting.

you also want to make sure that you are not starting your naming conventions with numbers, so I switched them around below.

Here is some changes to your code that you can try:

add_action('customize_register', 'homepage_sections');
//products
function homepage_sections($wp_customize){
    $wp_customize->add_panel(
        'homepage_sections', 
        array(
            'title'             => 'Homepage Sections',
            'priority'          => '20'
        )
    );
    $wp_customize->add_section(
        'homepage_settings_section', 
        array(
            'title'             =>  'Homepage settings',
            'panel'             =>  'homepage_sections',
        )
    );
    $wp_customize->add_setting(
        'homepage_settings_setting', 
        array(
            'default'           =>  1
        )
    );
    $wp_customize->add_control(
       new WP_Customize_Control(
          'homepage_settings_control', 
           array(
              'section'           =>  'homepage_settings_section',
              'settings'          =>  'homepage_settings_setting',
              'label'             =>  'Number of sections',
              'description'       =>  'Number of sections in homepage',
              'type'              =>  'number'
           )
        )
    );


    global $wpdb;
    $sections=$wpdb->get_results('SELECT section_id, section_title FROM vt_homepage_sections;');

    foreach($sections as $key) :
        $section_id=$key->section_id;
        $cust_setting_id = 'setting_' . $section_id;
        $cust_control_id = 'control_' . $section_id;


        $wp_customize->add_setting(
            $cust_setting_id,
            array(
                'default'   => '',
                'transport' => 'refresh',
            )
        );
        $wp_customize->add_control(
            new WP_Customize_Control(
                $cust_control_id,
                array(
                    'settings'          =>  $cust_setting_id,
                    'section'           =>  'homepage_settings_section',
                    'label'             =>  'test Control'
                )
            )
        );
    endforeach;
}