What is the opportunity cost if I choose the option of highest value I had a confusion about opportunity cost.

Suppose I have three alternatives which can be completed in same time, and can provide me the value of \$30, \$10 or \$40. If I choose the one with \$10 then, the opportunity cost will be \$40 as it is the best alternative that could have been done in the same time.

What if I choose the work with \$40. What will be its opportunity cost in this case as there is no better alternative here.
The opportunity cost of any decision is the value of the next-best alternative forgone. 

So in this case, if you choose \$40, your opportunity cost is \$30, because that's the value of the next-best alternative forgone. 

(Implicit assumption: These are your only three alternatives and you must choose one of these three.)