SELECT SUBSTRING(myfield,
/* 5-th slash */
CHARINDEX('/', myfield,
CHARINDEX('/', myfield,
CHARINDEX('/', myfield,
CHARINDEX('/', myfield,
CHARINDEX('/', myfield) + 1) + 1) + 1) + 1)
+ 1,
/* 6-th slash */
CHARINDEX('/', myfield,
CHARINDEX('/', myfield,
CHARINDEX('/', myfield,
CHARINDEX('/', myfield,
CHARINDEX('/', myfield,
CHARINDEX('/', myfield) + 1) + 1) + 1) + 1) + 1)
-
/* 5-th slash again */
CHARINDEX('/', myfield,
CHARINDEX('/', myfield,
CHARINDEX('/', myfield,
CHARINDEX('/', myfield,
CHARINDEX('/', myfield) + 1) + 1) + 1) + 1)
- 1)
FROM myTable
WHERE ...
This will work, but it's far from elegant. If possible, select the complete field and filter out the required value on the client side (using a more powerful programming language than T-SQL). As you can see, T-SQL was not designed to do this kind of stuff.
(Edit: I know the following does not apply to your situation but I'll keep it as a word of advise for others who read this:)
In fact, relational databases are not designed to work with string-separated lists of values at all, so an even better solution would be to split that field into separate fields in your table (or into a subtable, if the number of entries varies).