Views hook_views_data add multiple joins to custom table based on row condition
You can try code

file my_module.views.inc   

/**
     * Implements hook_views_data().
     */
    function my_module_views_data() {
      $data['custom']['views_handler_custom_field'] = array(
        'title' =&gt; t('Custom views field'),
        'help' =&gt; t('Field custom handler'),
        'field' =&gt; array(
          'handler' =&gt; 'views_handler_custom_field',
        ),
      );
    }


file my_module.module

/**
 * Implements hook_views_api().
 */
function my_module_views_api() {
  return array(
    'api' =&gt; 3
  );
}


file views_handler_custom_field.inc

class views_handler_custom_field extends views_handler_field{
  function query() {

    $this-&gt;ensure_my_table();
    $alias = 'custom_table';
    $this-&gt;query-&gt;add_field($alias,'node_id');

    // Month, you can copy it
    $aliasNode = 'node';
    $definition = array(
      'table' =&gt; $aliasNode,
      'field' =&gt; 'tid',
      'left_table' =&gt; 'custom_table',
      'left_field' =&gt; 'node_id',
      'type' =&gt; 'LEFT OUTER',
    );
    $join = new views_join();
    $join-&gt;definition = $definition;
    $join-&gt;construct();
    $join-&gt;adjusted = TRUE;
    $this-&gt;query-&gt;add_relationship($aliasNode, $join,$this-&gt;relationship);
    $formula ="";
    $this-&gt;query-&gt;add_field(NULL,$formula,'node_id');

  }

  function option_definition() {
    $options = parent::option_definition();
    $options['alter']['contains']['alter_text'] = array('default' =&gt; TRUE);
    return $options;
  }

  function options_form(&amp;$form, &amp;$form_state) {
    parent::options_form($form, $form_state);
  }

  function render($values) {
    var_dump($values);
  }
}


The API