The item sorter is a good answer.  Note:  This will only work with items that can stack.  I built a small version that only handles 2 different custom named items but could easily be scaled up to handle the 5 you want to use.  

The item sorter I used requires two hoppers per sorter.  A comparator measures the output of hopper that is specifically filled and this output allows the hopper underneath to take in items.  This prevents the initial hopper from emptying.  This makes that hopper only accept the item of your choosing. 

The contents of the custom filled "filter" hopper are a stack of 41 of the custom named paper and the other 4 spots filled with another custom named item.  I named the cobblestone filter.  

Sorter:
[![Sorter][1]][1]

By using multiple sorters you can then determine which sorter took in an item and output a signal.  
[![System][2]][2]

What I built is basic.  It would require emptying the chest after the mechanism is used.  A system could easily be built to send output pulses from each of the sections and not require the chest be emptied each time.  

This would require another hopper before the chest.  A comparator would output a pulse as the item passes through the hopper.

Example:
[![Sorter Pulser][3]][3]

Edit:  I forgot to mention, the filter hopper can not be pointed into the hopper below it.  If you look at this last image you can see, I have pointed the filter hopper into the comparator.  This is not required though, any direction but down in this case.  

  [1]: https://i.sstatic.net/RBVIt.png
  [2]: https://i.sstatic.net/t8RT2.png
  [3]: https://i.sstatic.net/mVJwJ.png