howto: switch based on the value of another field
i can not seem to find a way to implement this using existing facilities... 

```ksy
types:
  type_id:
    seq:
      - id: name_id
        type: u4
      - id: name
        type: strz
        encoding: UTF-8

  type_select:
    seq:
      - id: set_id
        type: u4
      - id: body
        type: 
           switch-on: ??? 
             cases:
                'FOO': foo_struct
                'BAR': bar_struct
```

So, the first type defines mapping between some number and name, e.g. FOO=>23, BAR=44.  The second type will define different substructures based on a 'set_id' number. I need a way to express this (including adding additional code)...something like:

- record_mapping(name_id, name) when processing type_id
- get_mapping_name(set_id) as input to switch-on when processing type_select.

thanks for help in advance.
  