To find last next value on the basis of Current and next row values in Sql server 2008

It's ok harishgg1
Thanks

@harishgg1

Your hard-work paid.
Got complete idea from your codes and manage to get desired result.
Here is a snapshot for live data

Njoy ... Mateen

The reason why i am doing is NOT hard work

I am doing for MANY other things like
Cognition
TIME Pass
Repetition
Mind Diversion
and many more .....................

As long as you got your solution .. Nice Very Nice

. is this OFFICE work ?

Yes, indeed.

Some labor staff detected a little fault in existing code and mis-utilized for a long period of time untill noticed by auditor.

Now I am re-writing the code.

Thanks