Assign menu programmatically upon saving node
Please try this

/**
 * Implements hook_node_insert().
 */
function YOUR_MODUEL_node_insert($node){
  create_node_menu($node, 'insert');
}

/**
 * Implements hook_node_update().
 */
function YOUR_MODUEL_node_update($node){
  create_node_menu($node, 'update');
}

function create_node_menu($node, $action_type){
  if($node-&gt;type == 'YOUR_NODE_TYPE'){
    $category = $node-&gt;field_category[LANGUAGE_NONE][0]['value'];
    $menu_name = '';
    switch($category){
      case "A":
        $menu_name = 'menu-menu-a';
        break;
      case "B":
        $menu_name = 'menu-menu-b';
        break;
      case "C":
        $menu_name = 'menu-menu-c';
        break;
    }
    if(!empty($menu_name)){
      $item = array(
        'menu_name' =&gt; $menu_name,
        'link_title' =&gt; $node-&gt;title,
        'link_path' =&gt; 'node/'. $node-&gt;nid,
      );
// update already created menu link
      if($action_type == 'update'){
        $mlid = db_select('menu_links' , 'ml')
            -&gt;condition('ml.link_path', 'node/'.$node-&gt;nid)
            -&gt;condition('ml.menu_name', $menu_name)
            -&gt;fields('ml' , array('mlid'))
            -&gt;execute()
            -&gt;fetchField();
        $item['mlid'] = $mlid;
      }
      $mlid = menu_link_save($item);
      menu_cache_clear_all();
    }
  }
}


Hope this will help.