What you can do is use :first
(Take the first element that is achieved with the class) or :last
(Take the last element with the class) as:
var test = $('.todo:first').val();
var testy2 = $('.todo:last').val();
Here is your example updated
Note: Here is useful because you only have 2 if you increase the number of controls it is better to look for another alternative, such as creating unique Ids.
Edit:
Based on your comment, what you can do is include each select with the button in separate div like this:
<div>
<select class="todo" id="ty">
<option selected>Ingrese cant</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
</select>
<div>
<button class="draw" id="draw" rel="1" data-select='1'>Draw</button>
</div>
<div>
<canvas id="1" width="200" height="200"></canvas>
</div>
</div>
Then via jQuery do this:
var test = $(this).parent().parent().find('select').val();
What it does is, go to the father of the father (This is the div that encompasses each section) look for the select, and give me its value.
Updated code here