pl/sql create function for adding specific column according to a condition
<p>my table looks like</p>

<pre><code>startday endday day1 day2 day3 day4
1        4      2    3    5    3      
3        4      3    5    1    6    
2        3      3    7   10    9
</code></pre>

<p>input for the function should be startday and endday.</p>

<p>if input is 1 and 3, output should be <code>day1+day2+day3</code></p>

<p>if input is 2 and 3, output should be <code>day2+day3</code></p>

<p>can anyone help me with this... </p>