Assuming a rather thin diameter like the hoses used for milk on espresso machines or camelbak drinking systems:
I'd go for a pipe cleaner - they come in different thicknesses and are quite flexible..
They will probably be too short for the total length, so get some thread - more than twice the hose length in total, cut in half.
Bend the pipe cleaner back and twist on both ends, forming a loop and making sure the wire end can't scratch the inside of the hose. Tie one length of thread to each loop on the ends. Use the threads to pull the pipe cleaner (soaked with detergent) back and forth through the hose. Rinse well.
A very small but heavy weight (e.g. small fishing lead) clamped to the end of one string can make threading the thread through the hose a lot easier: just let it "fall" through.
For thicker hoses, use the same principle, but use either a piece of a bottle brush or a piece of knotted fabric (with matching diameter) as the scrubbing part.