Does variable_get() first go to 'variable' table in the database or the $conf array in settings.php?
The function that is responsible for loading the values of the Drupal variables in memory is variable_init(), which executes the following code:

  if ($cached = cache_get('variables', 'cache')) {
    $variables = $cached-&gt;data;
  }
  else {
    $result = db_query('SELECT * FROM {variable}');
    while ($variable = db_fetch_object($result)) {
      $variables[$variable-&gt;name] = unserialize($variable-&gt;value);
    }
    cache_set('variables', $variables);
  }

  foreach ($conf as $name =&gt; $value) {
    $variables[$name] = $value;
  }


$conf, the value passed to the function from _drupal_bootstrap() is the array read from the settings.php file. The function that reads the configuration file is conf_init(), which is called from _drupal_bootstrap() before calling variable_init().
As you see in the code, the values read from the database are then overwritten with the values find in the $conf array.

Similar code is present in Drupal 7 (see drupal_bootstrap(), _drupal_bootstrap_configuration(), and _drupal_bootstrap_variables()).

The only way to use the value read from the database is to remove the value set in settings.php.